<?php

$config = [
	'components' => [
		'request' => [
			// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
			'cookieValidationKey' => 'tzslz_VLD04iG2ugOnmrJOhBroVyVh_x',
			'enableCsrfValidation' => true,
		],
		'urlManager' => [
			'enablePrettyUrl' => true,
			'showScriptName' => false,
			'enableStrictParsing' => true,
			'suffix' => '',
			'rules' => [
				'' => 'site/index',
				"<controller:\w+>/<action:[a-z\-]+>/cate_id/<cate_id:\d+>/cate_child_id/<cate_child_id:\d+>/tag_id/<tag_id:\d+>"=>"<controller>/<action>",
				"<controller:\w+>/<action:[a-z\-]+>/goods_id/<goods_id:\d+>"=>"<controller>/<action>",
				//add by FDG367 20180123 440 【MOBILE端URL形式调整】URL调整 start
				"<controller:\w+>/<action:[a-z\-]+>/cate_id/<cate_id:\d+>/cate_child_id/<cate_child_id:\d+>"=>"<controller>/<action>",
				"<controller:\w+>/<action:[a-z\-]+>/news_id/<news_id:\d+>"=>"<controller>/<action>",
				//add by FDG367 20180123 440 【MOBILE端URL形式调整】URL调整 END
				//add by FDG367 2018/03/10 537 【商城需求】限时抢GO的落地页更换 start
				"<controller:\w+>/<action:[a-z\-]+>/schedule/<schedule:\d+>"=>"<controller>/<action>",
				//add by FDG367 2018/03/10 537 537 【商城需求】限时抢GO的落地页更换 end
				"<controller:\w+>/<action:[a-z\-]+>/key/<key:\w+>"=>"<controller>/<action>",
				"<controller:\w+>/<action:[a-z\-]+>/brand_id/<brand_id:\d+>/cate_id/<cate_id:\d+>"=>"<controller>/<action>",
				"<controller:\w+>/<action:[a-z\-]+>/brand_id/<brand_id:\d+>"=>"<controller>/<action>",
				"<controller:\w+>/<action:[a-z\-]+>/cate_id/<cate_id:\d+>"=>"<controller>/<action>",
				"<controller:\w+>/<action:[a-z\-]+>/tag_id/<tag_id:\d+>"=>"<controller>/<action>",
				"<controller:\w+>/<action:[a-z\-]+>/id/<id:\d+>"=>"<controller>/<action>",
				'<controller:\w+>/<action:\w+>/<page:\d+>' =>'<controller>/<action>',
				//add by FDG367 2018-04-09 571 【商城需求】商城导航目录修改。（包含Mobile导航、Mobile首页导航、PC导航） start
				"<controller:[a-z\-]+>/<action:[a-z\-]+>/navigate/<navigate:\d+>/ident/<ident:\d+>"=>"<controller>/<action>",
				"<controller:[a-z\-]+>/<action:[a-z\-]+>/navigate/<navigate:\d+>"=>"<controller>/<action>",
				//add by FDG367 2018-04-09 571 【商城需求】商城导航目录修改。（包含Mobile导航、Mobile首页导航、PC导航） end
				"<controller:[a-z\-]+>/<action:[a-z\-]+>"=>"<controller>/<action>",
				//add by FDG367 2018/03/12 538 【商城需求】档期1802活动页-1需更换落地页 start
				"<controller:\w+>/<action:[a-z\-]+>/key/<key:\w+>/schedule/<schedule:\d+>"=>"<controller>/<action>",
				//add by FDG367 2018/03/12 538 【商城需求】档期1802活动页-1需更换落地页end
			],
		],

	],


];

if (!YII_ENV_TEST) {
	// configuration adjustments for 'dev' environment
	$config['bootstrap'][] = 'debug';
	$config['modules']['debug'] = [
		'class' => 'yii\debug\Module',
	];

	$config['bootstrap'][] = 'gii';
	$config['modules']['gii'] = [
		'class' => 'yii\gii\Module',
	];


}

return $config;
